import SwiftUI

struct CategoryBadge: View {
    var category: String
    var color: Color = .blue
    var body: some View {
        Text(category)
            .font(.caption2)
            .padding(.horizontal, 8)
            .padding(.vertical, 4)
            .background(color.opacity(0.15))
            .foregroundColor(color)
            .cornerRadius(8)
    }
}

#Preview {
    CategoryBadge(category: "公园", color: .green)
} 